package com.pwc.fusion.excelToDB;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;
@Component
public class ExcelSheet implements IDataAdaptor {

	private String name;

	private List<String[]> allData;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String[] getHeader() {
		if (allData != null && allData.size() > 0)			
		return allData.get(0);
		else
			return null;
	}

	public List<String[]> getContent() {

		List<String[]> newItem = new ArrayList<String[]>(allData);

		if (allData != null && allData.size() > 0)
			newItem.remove(0);

		return newItem;
	}

	public List<String[]> getAllData() {
		return allData;
	}
	
	public void setAllData(List<String[]> allData){
		this.allData=allData;
	}
	
	

}
